﻿using System.Collections.Generic;

namespace Microsoft.Services.Clab.UI.Mvvmc
{
    public sealed class ViewModelPropertyCollection
    {
        private Dictionary<string, ViewModelProperty> properties = new Dictionary<string, ViewModelProperty>();

        public ViewModelProperty this[string name]
        {
            get { return properties[name]; }
        }

        public bool Contains(string name)
        {
            return properties.ContainsKey(name);
        }

        internal void Add(ViewModelProperty viewModelProperty)
        {
            this.properties.Add(viewModelProperty.Name, viewModelProperty);
        }
    }
}
